import 'package:flutter/material.dart';

/// 医生模型
class DoctorModel {
  String name;
  String image;
  Color imageBox;
  List<String> specialties;  /// 医生的专长
  double score;   /// 医生的评分
  String bio;   /// 医生的简介
  List<CalendarModel> calendar;
  List<TimeModel> times;

  DoctorModel({
    required this.name,
    required this.image,
    required this.imageBox,
    required this.specialties,
    required this.score,
    required this.bio,
    required this.calendar,
    required this.times,
  });

  static List<DoctorModel> getDoctors() {
    List<DoctorModel> doctors = [];

    /// 添加数据
    doctors.add(DoctorModel(
      name: "Dr. John Doe",
      image: "assets/images/jenny.png",
      imageBox: Color(0xffFFA340).withOpacity(0.75),
      specialties: ["Orthopedic", "Pediatrician"],
      score: 4.5,
      bio: "Dr. John Doe is a pediatrician and orthopedic surgeon with over 20 years of experience. He specializes in treating children and adults with orthopedic and pediatric injuries. He has received several awards and honors for his work.",
      calendar: [
        CalendarModel(dayNumber: 14,dayName: "Sun",isSelected: false,),
        CalendarModel(dayNumber: 15,dayName: "Mon",isSelected: true,),
        CalendarModel(dayNumber: 16,dayName: "Tue",isSelected: false,),
        CalendarModel(dayNumber: 17,dayName: "Wed",isSelected: false,),
      ],
      times: [
        TimeModel(time: "09:00 AM", isSelected: true),
        TimeModel(time: "11:00 AM", isSelected: false),
        TimeModel(time: "03:00 PM", isSelected: false),
      ],
    ));
    doctors.add(DoctorModel(
      name: "Dr. Kevin Smith",
      image: "assets/images/kristin.png",
      imageBox: Color(0xff51A8FF).withOpacity(0.75),
      specialties: ["Dental Surgeon", "General Practitioner"],
      score: 4.0,
      bio: "Dr. Kevin Smith is a general practitioner and dental surgeon with over 15 years of experience. He specializes in treating all types of dental injuries. He has received several awards and honors for his work.",
      calendar: [
        CalendarModel(
          dayNumber: 14,
          dayName: "Sun",
          isSelected: true,
        ),
        CalendarModel(
          dayNumber: 15,
          dayName: "Mon",
          isSelected: false,
        ),
        CalendarModel(
          dayNumber: 16,
          dayName: "Tue",
          isSelected: false,
        ),
        CalendarModel(
          dayNumber: 17,
          dayName: "Wed",
          isSelected: false,
        ),
      ],
      times: [
        TimeModel(time: "09:00 AM", isSelected: false),
        TimeModel(time: "11:00 AM", isSelected: true),
        TimeModel(time: "03:00 PM", isSelected: false),
      ],
    ));

    return doctors;
  }
}

/// 日历模型
class CalendarModel {
  final int dayNumber;
  final String dayName;
  bool isSelected;

  CalendarModel({
    required this.dayNumber,
    required this.dayName,
    required this.isSelected,
  });
}

/// 时间模型
class TimeModel {
  final String time;
  bool isSelected;

  TimeModel({
    required this.time,
    required this.isSelected,
  });
}
